<!DOCTYPE html>
<html>
    <head>
        {include file="Script.tpl.htm" title="JPR"}
        <script type="text/javascript">
            function dosubmit()
            {
                var AllEmpty=true;
                $("#tbReport").find(":text").each(function(){
                    if($.trim($(this).val())!="")
                    {
                        AllEmpty=false;
                        return false;
                    }
                });
            if(AllEmpty)
            {
                $.miniAlert("请输入信息！");
                return false;
            }
                
            var options = {
                type: 'POST',
                url: 'ReportWrongWord.php',
                data: {
                    wordid:($("#formReport input[name='wordid']").val()),
                    word:($("#formReport input[name='word']").val()),
                    species:($("#formReport input[name='species']").val()),
                    read:($("#formReport input[name='read']").val()),
                    meaning:($("#formReport input[name='meaning']").val()),
                    remark:($("#formReport textarea[name='remark']").val())
                },
                dataType: "json"
            };
            $.ajax(options).done(
            function (result) { 
                if(result.returnval<0){
                    $.miniAlert("出错");
                }else
                {
                    $.miniAlert("成功");
                }
            })
            .fail(function () {
                $.miniAlert("异常");
            });
        }
            
        </script>
    </head>
    <body class="bgcolor_gray">
        {include file="Navigation.tpl.htm"}

        <div class="container">
            <form id="formReport"method="post">
                <input type="hidden" value="{$word.wordid}" name="wordid"/>
                <table id="tbReport" class="table table-bordered fontsize0 div460 margintop10">
                    <tr><th></th><th class="width140">当前</th><th class="width140">纠错</th></tr>
                    <tr><th>单词</th><td>{$word.word}</td><td><input type="text" name="word" class="input-medium"/></td></tr>
                    <tr><th>词性</th><td>{$word.species}</td><td><input type="text" name="species" class="input-medium"/></td></tr>
                    <tr><th>汉字</th><td>{$word.read}</td><td><input type="text" name="read" class="input-medium"/></td></tr>
                    <tr><th>解释</th><td>{$word.meaning}</td><td><input type="text" name="meaning" class="input-medium"/></td></tr>
                    <tr><th>备注</th><td></td><td></label><textarea type="text" rows="1"name="remark" class="input-medium"></textarea></tr>
                </table>
                <div class="div460 textalign_center"><input type="button" btn="btnPost" class="btn btn-info" value="提交" onclick="javascript:dosubmit();"></div>
            </form>
        </div>
    </body>
</html>
